<div id="modelContent" class="modal fade bs-modal-lg">
	<div class="modal-dialog modal-lg" >
		<div class="modal-content"></div>
	</div>
</div>
<div class="portlet box green">
	<div class="portlet-title">
		<div class="caption">
			<i class="fa fa-search"></i>查询内容
		</div>
		<div class="tools">
			<a href="javascript:;" class="collapse right" data-original-title="" title=""> </a>
		</div>
		<div class="actions">
			<a href="javascript:;" class="btn white btn-sm ajax-search"><i class="fa fa-search"></i>查询 </a> 
			<a href="javascript:;" class="btn white btn-sm search-reset"><i class="fa fa-eraser"></i>清除 </a>
		</div>
	</div>
	<div class="portlet-body form" style="display: block;">
		<form action="/product/list" class="form-horizontal" method="get" id="searchForm">
			<div class="form-body">
				<div class="row ">
					<div class="col-md-3">
						<label class="control-label col-md-4">货品编号：</label>
						<div class="col-md-8">
							<input class="form-control" type="text" name="code" maxlength="10" value="$!code">
						</div>
					</div>
					<div class="col-md-3">
						<label class="control-label col-md-4">货品名称：</label>
						<div class="col-md-8">
							<input class="form-control" type="text" name="name" maxlength="10" value="$!name">
						</div>
					</div>
					<div class="col-md-3">
						<label class="control-label col-md-4">是否上架：</label>
						<div class="col-md-8">
							<select name="flag" class="form-control">
								<option value="">全部</option>
		                    	<option value="1" #if($!flag==1) selected #end>是</option>
		                        <option value="0" #if($!flag==0) selected #end>否</option>
		                    </select>
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
</div>
<div class="portlet box green">
	<div class="portlet-title">
		<div class="caption">
			<i class="fa fa-cogs"></i>全部货品列表
		</div>
		<div class="tools">
			<a href="javascript:;" class="collapse" data-original-title="" title=""> </a>
		</div>
	</div>
	<div class="portlet-body">
		<div class="table-container table-scrollable">
			<table class="table table-bordered table-hover icheck-table" id="productTable">
				<thead>
					<tr>
						<!-- <th style="width: 20px">
							<input type="checkbox" class="icheck group-icheck"/>
						</th> -->
						<th>货品名称</th>
						<th>类别</th>
						<th>基本单位价格</th>
						<th>基本单位</th>
						<th>状态</th>
						<th class="col-md-1">操作</th>
					</tr>
				</thead>
				<tbody>
					#foreach ($!item in $!pageProduct.result)
					#set($prodImage = $!prodImageMap.get($!item).imageUrl)
					<tr class="odd gradeX">
						<!-- <td>
							<input type="checkbox" name="checkboxes" class="icheck" value="$!item.id" />
						</td> -->
						<td>
							<div style="display: inline-block">
								<a href="javascript:;">
									<img alt="" src="$!prodImage" title="$item.name" style="width: 60px; height: 60px">
								</a>
							</div>
							<div style="display: inline-block;margin-left: 10px">
								<p style="margin: 0"><a href="/product/preview?id=$!item.id" title="/product/preview?id=$!item.id" target="_blank">$item.name</a></p>
								<p style="margin: 0">$item.code</p>
							</div>
						</td>
						<td>$!item.category.name</td>
						<td>$!item.salesPrice</td>
						<td>$!item.unit.name</td>
						<td>
							#if($!item.flag=='true')
								销售中
							#else
								下架
							#end
						</td>
						<td>
							<a class="btn green btn-outline btn-sm ajaxify" code="product.edit" href="/product/edit?id=$!item.id&resultUrl=$!resultUrl"> 
								<i class="fa fa-edit"></i>	修改
							</a>
							<!-- <a class="btn green btn-outline btn-sm ajaxify" href="/product/related?mainProdId=$!item.id&$!queryReturn"> 
								<i class="fa fa-link"></i>	编辑关联货品
							</a> -->
						</td>
					</tr>
					#end
				</tbody>
			</table>
		</div>
		#set($page=$pageProduct)
		#set($pageUrl="/product/list.do?$!queryString&pageNo=")
		#parse("_page.htm")
	</div>
</div>
<script type="text/javascript" src="/assets/scripts/views-permission.js"></script>
<script type="text/javascript" src="/assets/scripts/views-icheck.js"></script>